﻿@using BootstrapBlazor.Server.Components.Samples.Table

<div class="row form-inline g-3">
    <div class="col-12 col-sm-6">
        <BootstrapInput @bind-Value="Model.Name" />
    </div>
    <div class="col-12 col-sm-6">
        <BootstrapInput @bind-Value="Model.Address" />
    </div>
    <div class="col-12 col-sm-6">
        <Select @bind-Value="Model.Education" />
    </div>
    <div class="col-12 col-sm-6">
        <Display Value="@EducationDesc" ShowLabel="true" DisplayText="@Localizer["TablesEditTemplateDisplayLabel"]" />
    </div>
</div>

@code {
    [Parameter]
    [NotNull]
    public Foo? Model { get; set; }

    [Inject]
    [NotNull]
    private IStringLocalizer<TablesEdit>? Localizer { get; set; }

    private string? EducationDesc => Model.Education == EnumEducation.Primary ? Localizer["TablesEditTemplateDisplayDetail1"] : Localizer["TablesEditTemplateDisplayDetail2"];
}
